package com.sms.common.result;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum ResultCode {
    
    SUCCESS(200, "操作成功"),
    FAILED(500, "操作失败"),
    PARAM_ERROR(400, "参数错误"),
    UNAUTHORIZED(401, "未授权"),
    FORBIDDEN(403, "禁止访问"),
    NOT_FOUND(404, "资源不存在"),
    
    // 短信相关错误码
    SMS_TEMPLATE_NOT_FOUND(1001, "短信模板不存在"),
    SMS_TEMPLATE_NOT_APPROVED(1002, "短信模板未审核通过"),
    SMS_QUOTA_INSUFFICIENT(1003, "短信额度不足"),
    SMS_PHONE_BLACKLISTED(1004, "手机号在黑名单中"),
    SMS_RATE_LIMIT_EXCEEDED(1005, "发送频率超限"),
    SMS_CHANNEL_UNAVAILABLE(1006, "短信通道不可用"),
    SMS_SEND_FAILED(1007, "短信发送失败"),
    
    // 风控相关错误码
    RISK_USER_BLOCKED(2001, "用户已被风控拦截"),
    RISK_LOCATION_SUSPICIOUS(2002, "用户位置异常"),
    RISK_FREQUENCY_ABNORMAL(2003, "发送频率异常"),
    RISK_CONTENT_SENSITIVE(2004, "短信内容包含敏感词"),
    
    // 系统相关错误码
    SYSTEM_ERROR(9001, "系统内部错误"),
    SERVICE_UNAVAILABLE(9002, "服务不可用"),
    TIMEOUT_ERROR(9003, "请求超时");
    
    private final Integer code;
    private final String message;
} 